/*
 * Copyright (c) 2022 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef FOUNDATION_APPEXECFWK_INTERFACES_INNERKITS_APPEXECFWK_BASE_INCLUDE_BUNDLE_ERRORS_H
#define FOUNDATION_APPEXECFWK_INTERFACES_INNERKITS_APPEXECFWK_BASE_INCLUDE_BUNDLE_ERRORS_H

#include "errors.h"

namespace OHOS {
namespace AppExecFwk {
constexpr ErrCode SUCCESS = 0;
constexpr ErrCode ERROR_PERMISSION_DENIED_ERROR = 201;
constexpr ErrCode ERROR_NOT_SYSTEM_APP = 202;
constexpr ErrCode ERROR_PARAM_CHECK_ERROR = 401;
constexpr ErrCode ERROR_SYSTEM_ABILITY_NOT_FOUND = 801;
constexpr ErrCode ERROR_BUNDLE_NOT_EXIST = 17700001;
constexpr ErrCode ERROR_MODULE_NOT_EXIST = 17700002;
constexpr ErrCode ERROR_ABILITY_NOT_EXIST = 17700003;
constexpr ErrCode ERROR_INVALID_USER_ID = 17700004;
constexpr ErrCode ERROR_INVALID_APPID = 17700005;
constexpr ErrCode ERROR_PERMISSION_NOT_EXIST = 17700006;
constexpr ErrCode ERROR_DEVICE_ID_NOT_EXIST = 17700007;
constexpr ErrCode ERROR_INSTALL_PARSE_FAILED = 17700010;
constexpr ErrCode ERROR_INSTALL_VERIFY_SIGNATURE_FAILED = 17700011;
constexpr ErrCode ERROR_INSTALL_HAP_FILEPATH_INVALID = 17700012;
constexpr ErrCode ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT = 17700015;
constexpr ErrCode ERROR_INSTALL_NO_DISK_SPACE_LEFT = 17700016;
constexpr ErrCode ERROR_INSTALL_VERSION_DOWNGRADE = 17700017;
constexpr ErrCode ERROR_INSTALL_DEPENDENT_MODULE_NOT_EXIST = 17700018;
constexpr ErrCode ERROR_UNINSTALL_PREINSTALL_APP_FAILED = 17700020;
constexpr ErrCode ERROR_INVALID_UID = 17700021;
constexpr ErrCode ERROR_INVALID_HAP_PATH = 17700022;
constexpr ErrCode ERROR_DEFAULT_APP_NOT_EXIST = 17700023;
constexpr ErrCode ERROR_PROFILE_NOT_EXIST = 17700024;
constexpr ErrCode ERROR_INVALID_TYPE = 17700025;
constexpr ErrCode ERROR_BUNDLE_IS_DISABLED = 17700026;
constexpr ErrCode ERROR_DISTRIBUTED_SERVICE_NOT_RUNNING = 17700027;
constexpr ErrCode ERROR_ABILITY_AND_TYPE_MISMATCH = 17700028;
constexpr ErrCode ERROR_ABILITY_IS_DISABLED = 17700029;
constexpr ErrCode ERROR_CLEAR_CACHE_FILES_UNSUPPORTED = 17700030;
constexpr ErrCode ERROR_INSTALL_HAP_OVERLAY_CHECK_FAILED = 17700031;
constexpr ErrCode ERROR_SPECIFIED_BUNDLE_NOT_OVERLAY_BUNDLE = 17700032;
constexpr ErrCode ERROR_SPECIFIED_MODULE_NOT_OVERLAY_MODULE = 17700033;
constexpr ErrCode ERROR_SPECIFIED_MODULE_IS_OVERLAY_MODULE = 17700034;
constexpr ErrCode ERROR_SPECIFIED_BUNDLE_IS_OVERLAY_BUNDLE = 17700035;
constexpr ErrCode ERROR_INSTALL_SHARE_APP_LIBRARY_NOT_ALLOWED = 17700036;
constexpr ErrCode ERROR_UNINSTALL_SHARE_APP_LIBRARY_IS_RELIED = 17700037;
constexpr ErrCode ERROR_UNINSTALL_SHARE_APP_LIBRARY_IS_NOT_EXIST = 17700038;
constexpr ErrCode ERROR_INSTALL_FILE_IS_SHARED_LIBRARY = 17700039;
constexpr ErrCode ERROR_UNINSTALL_BUNDLE_IS_SHARED_BUNDLE = 17700040;
constexpr ErrCode ERROR_DISALLOW_INSTALL = 17700041;
constexpr ErrCode ERROR_INSTALL_WRONG_DATA_PROXY_URI = 17700042;
constexpr ErrCode ERROR_INSTALL_WRONG_DATA_PROXY_PERMISSION = 17700043;
constexpr ErrCode ERROR_INSTALL_WRONG_MODE_ISOLATION = 17700044;
constexpr ErrCode ERROR_DISALLOW_UNINSTALL = 17700045;
constexpr ErrCode ERROR_INSTALL_ALREADY_EXIST = 17700047;
constexpr ErrCode ERROR_INSTALL_CODE_SIGNATURE_FAILED = 17700048;
constexpr ErrCode ERROR_INSTALL_SELF_UPDATE_BUNDLENAME_NOT_SAME = 17700049;
constexpr ErrCode ERROR_INSTALL_ENTERPRISE_BUNDLE_NOT_ALLOWED = 17700050;
constexpr ErrCode ERROR_INSTALL_SELF_UPDATE_NOT_MDM = 17700051;
constexpr ErrCode ERROR_INSTALL_DEBUG_BUNDLE_NOT_ALLOWED = 17700052;
constexpr ErrCode ERROR_NOT_APP_GALLERY_CALL = 17700053;
constexpr ErrCode ERROR_INSTALL_PERMISSION_CHECK_ERROR = 17700054;
constexpr ErrCode ERROR_INVALID_LINK = 17700055;
constexpr ErrCode ERROR_SCHEME_NOT_IN_QUERYSCHEMES = 17700056;
constexpr ErrCode ERROR_BUNDLE_NOT_PREINSTALLED = 17700057;
constexpr ErrCode ERROR_INSTALL_FAILED_CONTROLLED = 17700058;
constexpr ErrCode ERROR_INVALID_DEVELOPERID = 17700059;
constexpr ErrCode ERROR_BUNDLE_CAN_NOT_BE_UNINSTALLED = 17700060;
constexpr ErrCode ERROR_INVALID_APPINDEX = 17700061;
constexpr ErrCode ERROR_APPLICATION_UNINSTALL = 17700062;
constexpr ErrCode ERROR_START_SHORTCUT_ERROR = 17700065;

// native bundle
constexpr ErrCode ERROR_INSTALL_NATIVE_FAILED = 17700066;
constexpr ErrCode ERROR_UNINSTALL_NATIVE_FAILED = 17700067;

constexpr ErrCode ERROR_APP_NOT_SUPPORTED_MULTI_TYPE = 17700069;

constexpr ErrCode ERROR_SHORTCUT_ID_ILLEGAL_ERROR = 17700070;
constexpr ErrCode ERROR_INSTALL_EXISTED_ENTERPRISE_NOT_ALLOWED_ERROR = 17700071;
constexpr ErrCode ERROR_GET_LAUNCH_WANT_INVALID = 17700072;
constexpr ErrCode ERROR_INSTALL_FAILED_INCONSISTENT_SIGNATURE = 17700073;
constexpr ErrCode ERROR_INVALID_APPIDENTIFIER = 17700074;
constexpr ErrCode ERROR_INVALID_UNINSTALL_RULE = 17700075;
constexpr ErrCode ERROR_APP_DISTRIBUTION_TYPE_NOT_ALLOW_INSTALL = 17700076;
constexpr ErrCode ERROR_INSTALL_FAILED_AND_RESTORE_TO_PREINSTALLED = 17700077;

// migrate data
constexpr ErrCode ERROR_SOURCE_PATHS_AREINVALID = 17700080;
constexpr ErrCode ERROR_DESTINATION_PATHS_AREINVALID = 17700081;
constexpr ErrCode ERROR_USER_AUTHENTICATION_FAILED = 17700082;
constexpr ErrCode ERROR_WAITING_FOR_USER_AUTHENTICATION_TIMEOUT = 17700083;
constexpr ErrCode ERROR_SOURCE_PATH_ACCESS_FAILED = 17700084;
constexpr ErrCode ERROR_DESTINATION_PATH_ACCESS_FAILED = 17700085;
constexpr ErrCode ERROR_DATA_MIGRATION_COPY_FAILED = 17700086;

// plugin errCode
constexpr ErrCode ERROR_DEVICE_NOT_SUPPORT_PLUGIN = 17700087;
constexpr ErrCode ERROR_CHECK_SUPPORT_PERMISSION = 17700088;
constexpr ErrCode ERROR_PLUGIN_ID_PARSE_ERROR = 17700089;
constexpr ErrCode ERROR_PLUGIN_ID_CHECK_ERROR = 17700090;
constexpr ErrCode ERROR_PLUGIN_SAME_BUNDLE_NAME = 17700091;
constexpr ErrCode ERROR_PLUGIN_NOT_FOUND = 17700092;

// bundle service exception
constexpr ErrCode ERROR_BUNDLE_SERVICE_EXCEPTION = 17700101;

// verify abc
constexpr ErrCode ERROR_VERIFY_ABC = 17700201;
constexpr ErrCode ERROR_DELETE_ABC = 17700202;

// extend resource
constexpr ErrCode ERROR_ADD_EXTEND_RESOURCE = 17700301;
constexpr ErrCode ERROR_REMOVE_EXTEND_RESOURCE = 17700302;
constexpr ErrCode ERROR_GET_EXTEND_RESOURCE = 17700303;
constexpr ErrCode ERROR_ENABLE_DYNAMIC_ICON = 17700304;
constexpr ErrCode ERROR_DISABLE_DYNAMIC_ICON = 17700305;
constexpr ErrCode ERROR_GET_DYNAMIC_ICON = 17700306;
constexpr ErrCode ERROR_ENABLE_DYNAMIC_ICON_DUE_TO_EXISTING_CUSTOM_THEMES = 17700307;

// setAbilityFileTypesForSelf
constexpr ErrCode ERROR_SET_ABILITY_FILE_TYPES_FOR_SELF = 17700351;

// zlib errCode
constexpr ErrCode ERR_ZLIB_SRC_FILE_INVALID = 900001;
constexpr ErrCode ERR_ZLIB_DEST_FILE_INVALID = 900002;
constexpr ErrCode ERR_ZLIB_SRC_FILE_FORMAT_ERROR_OR_DAMAGED = 900003;
} // AppExecFwk
} // OHOS
#endif // FOUNDATION_APPEXECFWK_INTERFACES_INNERKITS_APPEXECFWK_BASE_INCLUDE_BUNDLE_ERRORS_H

